package com.fbt.transfer.app.driver.model;

import cn.hutool.core.bean.BeanUtil;
import com.fbt.transfer.app.driver.util.AppInfoUtils;
import java.util.Map;
import lombok.Data;

/**
 * @author tuocoo
 * @date 2024/8/7/14:00
 */
@Data
public class AppQuery {

  private String appName;
  private String version;
  private long versionCode;
  private String platform;
  private String channel;

  public static Map<String, Object> toMap() {
    String version = AppInfoUtils.getAppVersion();
    AppQuery appQuery = new AppQuery();
    /*appQuery.setAppName(android.os.Build.na);*/
    appQuery.setVersionCode(AppInfoUtils.getAppCode());
    appQuery.setPlatform("android");
    appQuery.setVersion(version);
    appQuery.setAppName("东潮出行队长端");
    appQuery.setChannel(AppInfoUtils.APP_NAME);
    return BeanUtil.beanToMap(appQuery);
  }
}
